//
//  NetViewController.m
//  YSSmartHome
//
//  Created by yanghao on 2016/10/17.
//  Copyright © 2016年 yahaong. All rights reserved.
//

#import "NetViewController.h"
#import <WebKit/WebKit.h>
#import "YHMarcros.h"

@interface NetViewController ()

@property (nonatomic, strong)WKWebView *webView;
@end

@implementation NetViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self.view addSubview:self.webView];
    [self.webView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
    }];
    [self.webView loadRequest:[NSURLRequest requestWithURL:self.url]];
}

- (void)setUrl:(NSURL *)url
{
    _url = url;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - lazy loading 

- (WKWebView *)webView
{
    if (!_webView) {
        _webView = [[WKWebView alloc]init];
    }
    return _webView;
}
@end
